<template>
    <div class="manager-archive-audio__wrapper">
        <template v-for="archive in archives">
            <archiveAudioCard :key="archive.aid" :archive="archive"></archiveAudioCard>
        </template>
    </div>
</template>

<script>
import { archiveAudioListFinderAPI } from "@/api/km_archive_audio";
import archiveAudioCard from "./components/archiveAudioCard.vue";

export default {
    components: {
        archiveAudioCard,
    },
    data() {
        return {
            archives: [],
        };
    },
    created() {
        this.getArchiveAudioList();
    },
    methods: {
        getArchiveAudioList() {
            archiveAudioListFinderAPI({
                page: 1,
                size: 20,
            })
                .then((res) => {
                    console.log(res);
                    this.archives = res.data;
                })
                .catch((err) => {
                    console.log(err);
                    this.$message.error("网络错误");
                });
        },
    },
};
</script>

<style lang="scss" scoped>
.manager-archive-audio__wrapper{
    width: 1160px;
    margin: auto;
}
</style>